-- GENERATED SPELL FOR [Befouled Water Elemental] --


function spell0_3917(pUnit, Event) --@Foul Chill,n/a--
pUnit:FullCastSpellOnTarget(6873,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3917', 535, 1)
end

function spell1_3917(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3917', 7000, 1)
end

function Sorts_3917(pUnit, Event)
local choix_sorts_3917 = math.random(0, 1)
if choix_sorts_3917 == 0 then
pUnit:RegisterEvent('spell0_3917', 1, 1)
end
if choix_sorts_3917 == 1 then
pUnit:RegisterEvent('spell1_3917', 1, 1)
end
end

function mob3917_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3917', math.random(1500, 3000), 1)
end

function mob3917_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3917_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3917_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3917, 1, 'mob3917_Action')
RegisterUnitEvent(3917, 2, 'mob3917_Leave')
RegisterUnitEvent(3917, 3, 'mob3917_Kill')
RegisterUnitEvent(3917, 4, 'mob3917_Die')
